﻿using Microsoft.AspNetCore.Identity;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace SubstrateHelper.Models
{
    public class InventoryInOutRecord
    {
        [Display(Name = "Id")]
        [Required(ErrorMessage = "不能为空！")]
        public int InventoryInOutRecordID { get; set; }

        [Display(Name = "物料Id")]
        [Required(ErrorMessage = "不能为空！")]
        
        public string ProductionEntityName { get; set; }

        [Display(Name = "时间")]
        [Required(ErrorMessage = "不能为空！")]
        public DateTime DateTime { get; set; }

        
        

        [Display(Name = "批号/编号")]        
        [Required(ErrorMessage = "不能为空！")]        
        public string InventoryID { get; set; }

        public Inventory Inventory { get; set; }


        

        [Display(Name = "进出库数量")]
        [Required(ErrorMessage = "不能为空！")]
        public double Quantity { get; set; }

        

        [Display(Name = "备注")]
        //[Required(AllowEmptyStrings = true)]
        [StringLength(50, ErrorMessage = "最大长度=50！")]
        public string Remarks { get; set; }

        


        [Display(Name = "用户Id")]
        [Required(ErrorMessage = "不能为空！")]        
        public string UserId { get; set; }

        
        //public IdentityUser User { get; set; }

    }
    
}
